package com.one.service;

import com.one.annotation.RequestPermission;
import com.one.annotation.RequestUser;
import com.one.bean.Orders;
import com.one.util.RequestReturn;
import com.one.util.RequestReturnFactory;
import com.one.vo.OrderVo;
import com.one.vo.UserVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @Author ShiWen
 * @date 2022/1/20 9:51
 * @Version 1.0
 * @Description TODO 订单服务接口
 */
@FeignClient(name = "street-userinfo")
public interface OrderService {
    /**
     *  查询全部订单
     */
    @RequestPermission
    @GetMapping("/queryOrder")
    RequestReturn<List<Orders>> queryAllOrder();
    /**
     * @description 根据订单状态查询订单
     * @author ShiWen
     * @date 2022/1/18 16:01
     */
    @GetMapping("/queryOrderByStatus")
    RequestReturn<List<Orders>> queryOrderByStatus(@RequestParam("status") Integer status);
    /**
     *  查询订单详细信息
     */
    @RequestPermission
    @GetMapping("/queryOrderById")
    RequestReturn<OrderVo> queryById(@RequestParam("orderId") Integer orderId);

    /**
     *  快递下单
     */
    @PostMapping("/orderExpress")
    RequestReturn<String> orderExpress(@RequestParam("orderNo") String orderNo);
    /**
     * @description 快递查询
     * @author ShiWen
     * @date 2022/1/19 8:39
     */
    @PostMapping("/selectExpress")
    RequestReturn<Map<String,Object>> selectExpress(@RequestParam("LogisticCode") String LogisticCode, @RequestParam("orderNo") String orderNo);
}
